<?php
/*
basic MVC engine,
using external files for SQL query templates and view templates,
loading custom parameters from INI files

file version
*/
class MVCEngine {
/*--------------------------------------------------------------------------------------------------
                                                                                         constructor
--------------------------------------------------------------------------------------------------*/
	function MVCEngine($iniFile=NULL) {
		// loading ini file
		if (is_file($iniFile)) {
			$p=parse_ini_file($iniFile);
			// merging it with default parameters
			if ($p) $this->p=wakArrayMergeRR($this->p, $p);
		}
		$this->data=&new datatree();
	}
/*--------------------------------------------------------------------------------------------------
                                                                                      public methods
--------------------------------------------------------------------------------------------------*/
	/*
	*/
	function importResult($query,$pathTo) {

	}

	function importUniqueResult($query,$pathTo) {

	}

	function getFedView($view,$pathFrom) {

	}
/*--------------------------------------------------------------------------------------------------
                                                                                          properties
--------------------------------------------------------------------------------------------------*/

	// default parameters
	var $p=array(
		'general'=>array(
			'queriesPath'=>'sql/',
			'viewsPath'=>'xhtml/'
		),
		// SQL query files array : query-id => filename
		'queries'=>array(),
		// view template files array : template => filename
		'views'=>array()
	);
/*--------------------------------------------------------------------------------------------------
                                                                                     private methods
--------------------------------------------------------------------------------------------------*/
	/*
	*/
	function () {

	}
}
?>
